import React, { memo } from "react";
import { ActionBar } from "react-vant";
import { CartO} from "@react-vant/icons";
import {useSelector} from "react-redux"
const MyActionBar = memo(() => {
  const arr = useSelector(state=> state.goods.goodsList)
  return (
    <div>
      <ActionBar>
        <ActionBar.Icon icon={<CartO />} badge={{content:arr.length }} text="购物车" />
        <ActionBar.Button type="warning" text="加入购物车" />
        <ActionBar.Button type="danger" text="立即购买" />
      </ActionBar>
    </div>
  );
});

export default MyActionBar;
